import { ajax } from '@/api';
import { ElMessage } from 'element-plus';

// 获取角色列表
export const getRoleList = async (page: any) => { 
    ajax({
      url: "role/list",
      method: 'POST',
      data: page,
      success: (res) => {
        if (res.code == 0) {
          return res;
        } else {
          ElMessage.error(res.msg);
        }
      }
    });
};

// 默认导出对象，包含所有方法
export default {
  getRoleList
};